MYSQL_HOST="192.168.0.190"
MYSQL_USERNAME="yapai"
MYSQL_PASSWORD="ypkj@1234"
MYSQL_PORT=3306
EXCLUDE_TABLE=()
currentHome=$(cd "$(dirname "$0")";pwd)
tables=`mysql -h${MYSQL_HOST} -u${MYSQL_USERNAME} -p${MYSQL_PASSWORD} -P${MYSQL_PORT} -e"show databases;" | sed -n '2,$p' | grep -v "nacos" | grep -v "mysql" | grep -v "sys"`
echo "will show table names"
for table in ${tables[@]}
do
  if [[ "${EXCLUDE_TABLE[@]}" =~ "$table" ]]
  then
    continue
  fi
  echo ${table}
  python3 ${currentHome}/export.py -u yapai:ypkj@1234@192.168.0.190:3306 -d ${table}
done

